//
// Created by root on 20-1-16.
//

#include "service_cache.h"
#include "../log_utils.h"

#define LOG_TAG "ServiceCache"

void ServiceCache::Put(const std::string &name, jobject service) {
    mCacheMap.insert(std::make_pair(name,service));
}

jobject ServiceCache::Get(const std::string &name) {
    auto itor=mCacheMap.find(name);
    if(itor==mCacheMap.end()){
        AKTagLogErr("fail to get service:%s\n",name.c_str());
        return nullptr;
    }
    return itor->second;
}
